package com.tools;

import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

public class CommonThings {
    public static String tokenValue;
    public static String userId;

    public static String getRiskGrade(int num){
        String riskGrade = "";
        switch (num){
            case 0:
                riskGrade = "低风险";
                break;
            case 1:
                riskGrade = "中风险";
                break;
            case 2:
                riskGrade = "高风险";
                break;
        }
        return riskGrade;
    }

    public static String invertPercent(double num){
        DecimalFormat df = new DecimalFormat("0.00%");
        return df.format(num);
    }

    public static String getAppoint(int num){
        String riskGrade = "";
        switch (num){
            case 0:
                riskGrade = "预约失败";
                break;
            case 1:
                riskGrade = "预约成功";
                break;
        }
        return riskGrade;
    }
}
